<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>子窗体</title>
        
        <script>
        function getFatherData()
        {
            debugger 
            if (window.opener) {
             console.log('window.opener');
             var data=window.opener.mixedVar;
                
            } else {
             var data=window.father_obj;
            };
             console.log(data);
             var divpar=document.getElementById("divpar");
             divpar.innerText = data.toString();
        }
        function sendFatherData()
        {
              var obj={c:"it-s c",d:14};//获取子窗口对象 
              debugger 
              //opener.getChildData(obj);//调用父窗口的函数进行传送;
              window.opener.returnValue=obj;
              window.close();
         }
         
        </script>
        
	</head>
	<body>
            这是子窗体<br/>
            测试，父窗体传入的对象：<br/>
            <input type="button" value="获取父对象" onclick="getFatherData()"><br/>
            <div id="divpar" style="border:solid thin red">还没有</div>
            <input type="button" value="关闭子窗体" onclick="sendFatherData()">
	</body>
</html>
